$(function () {
	$("#login-form").validate({
		errorElement : "label",  
        errorClass : "text-danger",  
        rules : {  
        	account : {  
            	required : true,
            	minlength: 5,
            	maxlength: 30
            },  
            password: {  
                required : true,
                minlength: 5,
            	maxlength: 30
            }
        },
        messages: {
        	account: {
        		required: "账号不能为空",
        		minlength: "账号长度不能小于5个字符",
        		maxlength: "账号长度不能超过30个字符"
        	},
        	password: {
        		required : "密码不能为空",
                minlength: "密码长度不能小于5个字符",
            	maxlength: "密码长度不能超过30个字符"
        	}
        },
        submitHandler : function (validator, form) {
        	$("#login-submit").html("登录中...");
        	$.showloading();
        	return true;
        }
	});
	
});